package com.shenyi.shop.service;

import com.shenyi.shop.api.IRelatedGoodsService;
import com.shenyi.shop.dao.RelatedGoodsMapper;
import com.shenyi.shop.entity.RelatedGoodsDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author richard.fan
 * @version 1.0
 * @date 2018/11/05
 * @desc 关联商品
 * @see
 * @since 1.0
 */
@Service
public class RelatedGoodsServiceImpl implements IRelatedGoodsService {


    @Autowired
    private RelatedGoodsMapper relatedGoodsMapper;

    @Override
    public RelatedGoodsDO queryObject(Integer id){
        return relatedGoodsMapper.queryObject(id);
    }

    @Override
    public List<RelatedGoodsDO> queryList(Map<String, Object> map){
        return relatedGoodsMapper.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map){
        return relatedGoodsMapper.queryTotal(map);
    }

    @Override
    public void save(RelatedGoodsDO relatedGoods){
        relatedGoodsMapper.save(relatedGoods);
    }

    @Override
    public void update(RelatedGoodsDO relatedGoods){
        relatedGoodsMapper.update(relatedGoods);
    }

    @Override
    public void delete(Integer id){
        relatedGoodsMapper.delete(id);
    }

    @Override
    public void deleteBatch(Integer[] ids){
        relatedGoodsMapper.deleteBatch(ids);
    }
}
